/*
 * Copyright © 2024-2025 Wenze Wei
 *
 * This file is part of StadionOS.
 *
 * This Source Code Form is subject to the terms of the GNU General Public License, v. 2.0.
 * You can obtain a copy of the GPL at
 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 */

#include "../include/print.h"

/**
 * @brief Prints formatted output to the standard output.
 *
 * This function prints formatted output to the standard output (file descriptor 1).
 * It uses the Svsprint function to convert the formatted string into a plain string,
 * which is then written to the standard output using Swrite.
 *
 * @param fmt The format string.
 * @return void
 */
void Sprint(const char *fmt,...) {
	char buffer[256];
	va_list args;
	va_start(args,fmt);

	int len = Svsprint(buffer, fmt ,args);

	va_end(args);

	Swrite(1, buffer, len);
}
